import request from '@/utils/request'
import upload from '@/utils/upload'

// 查询承运商司机信息列表
export function getDriverList(data) {
	return request({
		url: '/logi/logi/carrierDriver/list',
		method: 'post',
		data:data
	})
}

// 修改承运商司机信息
export function updateDriverProfile(data) {
	return request({
		url: '/logi/logi/carrierDriver',
		method: 'put',
		data: data
	})
}

// 新增承运商司机信息
export function addDriver(data) {
	return request({
		url: '/logi/logi/carrierDriver',
		method: 'post',
		data: data
	})
}

// 删除承运商司机信息
export function deleteDriver(ids) {
	return request({
		url: '/logi/logi/carrierDriver/' + ids,
		method: 'delete'
	})
}

// 获取我的客户详细信息
export function getDriverDetails(id) {
	return request({
		url: '/logi/logi/carrierDriver/'+id,
		method: 'get'
	})
}


// 查询承运商车辆信息列表
export function getCarrierCarList(data) {
	return request({
		url: '/logi/logi/carrierCar/list',
		method: 'post',
		data:data
	})
}

// 通过车牌号获取承运商车辆详细信息
export function getCarrierCarDetails(licensePlate) {
	return request({
		url: '/logi/logi/carrierCar/queryByLicensePlate/'+licensePlate,
		method: 'get'
	})
}

// 上传司机相关附件
export function uploadFile(tempFiles) {
    return upload({
		url: '/sys/oss/upload',
		filePath:tempFiles[0].path,
		file:tempFiles[0].file
    })
}